/*************************************
Button.h
Created By VietRise on 21/6/2014

*************************************/

#ifndef __BUTTON_H__
#define __BUTTON_H__

#include "cocos2d.h"
#include "GameConfig.h"

class ScreenStart;
USING_NS_CC;

class Button : public CCSprite
{
private:
	CCAction* _moveIn;
	CCAction* _moveOut;
	CCAction* _moveInOut;

public:
	CC_SYNTHESIZE(ScreenStart*, _game, Game);
	CC_SYNTHESIZE(TYPEBUTTON, _type, Type);
	CC_SYNTHESIZE(STATEBUTTON, _state, State);
	CC_SYNTHESIZE(CCTouch*, _touch, Touch);

	~Button();
	Button(ScreenStart* game, TYPEBUTTON type);
	static Button* create(ScreenStart* game, TYPEBUTTON type);
	void createAction();
	void moveIn();
	void moveOut(bool replaceScreen);
	void moveInOut();

	void setStatePress();
	void setStateOut();
	void setStateNormal();
	void replaceScreen(CCNode* pSender);
};

#endif // __BUTTON_H__
